FROM docker.1ms.run/library/python:3.14.0-slim
WORKDIR /app
ENV TZ=Asia/Shanghai
RUN sed -i -E 's/(deb|security).debian.org/mirrors.huaweicloud.com/g' /etc/apt/sources.list.d/debian.sources
RUN apt update &&  apt install -y python3-dev default-libmysqlclient-dev build-essential pkg-config
RUN mkdir -p ~/.pip && echo "[global]" > ~/.pip/pip.conf && echo "index-url=http://mirrors.aliyun.com/pypi/simple/" >> ~/.pip/pip.conf && echo "[install]" >> ~/.pip/pip.conf && echo "trusted-host=mirrors.aliyun.com" >> ~/.pip/pip.conf
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . .
#RUN python3 manage.py collectstatic --noinput
EXPOSE 8000
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "3", "dev07.wsgi:application"]
#
